import { ApiProperty } from '@nestjs/swagger'
import { IsString, IsNotEmpty, IsNumber, IsOptional } from 'class-validator'

export class CreateRoleDto {
  @ApiProperty({ description: '角色名称(英文)' })
  @IsString({ message: 'name string' })
  @IsNotEmpty({ message: 'name empty' })
  readonly name: string

  @ApiProperty({ description: '角色标题' })
  @IsString()
  @IsNotEmpty()
  readonly title: string

  @ApiProperty({ description: '状态（是否启用）' })
  @IsOptional()
  @IsNumber()
  readonly status?: number
}
